package com.ict.web.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @author xc
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class ReviewTaskEditDto {

    /** 项目id */
    @ApiModelProperty(value = "项目id")
    @NotNull(message = "项目id不能为空")
    private Long proId;

    /** 评审地点 */
    @ApiModelProperty(value = "评审地点")
    @NotBlank(message = "评审地点不能为空")
    private String reviewAddress;

    /** 评审开始时间 */
    @ApiModelProperty(value = "评审开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8",shape = JsonFormat.Shape.STRING)
    private LocalDateTime reviewTimeStart;

    /** 评审结束时间 */
    @ApiModelProperty(value = "评审结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8",shape = JsonFormat.Shape.STRING)
    private LocalDateTime reviewTimeEnd;
}
